package cn.wolfcode.luowowo.member.service;

import cn.wolfcode.luowowo.common.util.AjaxResult;
import cn.wolfcode.luowowo.member.domain.UserInfo;

import java.util.List;

public interface IUserInfoService {

    /**
     * 检查手机号是否已被注册
     * @param phone
     * @return true表示该手机号码可以注册
     */
    boolean checkPhone(String phone);

    /**
     * 用户注册
     * @param verifyCode
     * @param phone
     * @param nickname
     * @param password
     * @param rpassword
     * @return
     */
    AjaxResult userRegist(String verifyCode, String phone, String nickname, String password, String rpassword);

    /**
     * 用户登录
     * @param phone
     * @param password
     * @return
     */
    AjaxResult userLogin(String phone, String password);

    /**
     * 获取所有用户
     * @return
     */
    List<UserInfo> list();

    /**
     * 获取用户信息
     * @param userInfoId
     * @return
     */
    UserInfo getById(Long userInfoId);
    /**
     * 添加访客
     * @param uid
     * @param id
     */
    void addVisitor(Long uid, Long id);
    /**
     * Author wzp
     * 根据用户的id查询访客
     * @param uid
     * @return 访客列表
     */
    List<UserInfo> listvisitor(Long uid);

    Integer gettotal(Long uid);

    Integer nowdayTotal(Long uid);

    Integer getAttentionNumById(Long uid);

    Integer getFansNumById(Long uid);

    List<UserInfo> getAttentionUser(Long uid);

    void update(UserInfo userInfo);

    Integer getIntegrity(Long id);

    void updateHeadImg(Long userInfoId, String upload);

    AjaxResult verifyPhone(Long id, String phone);

    AjaxResult changePW(Long id, String password);

    AjaxResult verifyEmail(Long id, String email);

    AjaxResult bindingEmail(Long id, String email);

    AjaxResult changePhone(Long id, String phone);

    AjaxResult verifyPEP(Long id, String phone, String email, String password);
}
